 {
        
   cc.Class({
            extends: cc.Component,
            properties: {
                spBg: {
                    default: null,
                    type: cc.Sprite
                },
                spTile: {
                    default: null,
                    type: cc.Sprite
                },
                seatId: 0
            },
            onLoad: function () {
                Global.notificationCenter.on(Global.eventName.MSG_LIEDOWN_SETYELLOW, this.onSetYellow.bind(this), this);
            },
            onDestroy: function () {
                Global.notificationCenter.offAll(this);
            },
            start: function () {
            },
            updateTile: function (e, t, n) {
                if (this._tile = e, this._isGameEnd = t, console.log("lieTile updateTile isGameEnd:", t),
                1 == t) {
                    var o = null, i = null, a = null;
                    this.seatId == Global.config.SEAT_DOWN && (a = "Texture/mj_az_tiles", o = "mj_az_02",
                        i = "mj_az_02_" + e), this.seatId == Global.config.SEAT_RIGHT && (a = "Texture/mj_ar_tiles",
                        o = "mj_ar_01", i = "mj_ar_01_" + e), this.seatId == Global.config.SEAT_UP && (a = "Texture/mj_ad_tiles",
                        o = "mj_ad_01", i = "mj_ad_01_" + e), this.seatId == Global.config.SEAT_LEFT && (a = "Texture/mj_al_tiles",
                        o = "mj_al_01", i = "mj_al_01_" + e), console.log("lieTile updateTile seatId:", this.seatId, this.spTile, a, i),
                        Global.spriteAtlas.setSpriteFrame(this.spTile, a, i), this.spTile.node.active = !0,
                        Global.spriteAtlas.setSpriteFrame(this.spBg, a, o);
                } else {
                    o = null, i = null, a = null;
                    this.seatId == Global.config.SEAT_DOWN && (a = "Texture/mj_az_tiles", o = "mj_bz_02"),
                    this.seatId == Global.config.SEAT_RIGHT && (a = "Texture/mj_ar_tiles", o = "mj_br_02",
                    1 == n && (o = "mj_cr_01_copy")), this.seatId == Global.config.SEAT_UP && (a = "Texture/mj_ad_tiles",
                        o = "mj_bd_02", 1 == n && (o = "mj_bd_01")), this.seatId == Global.config.SEAT_LEFT && (a = "Texture/mj_al_tiles",
                        o = "mj_bl_02", 1 == n && (o = "mj_cl_01")), this.spTile.node.active = !1, Global.spriteAtlas.setSpriteFrame(this.spBg, a, o);
                }
            },
            setYellow: function () {
                this.spTile && (this.spTile.node.color = cc.color(205, 216, 75, 255)), this.spBg && (this.spBg.node.color = cc.color(205, 216, 75, 255));
            },
            setGary: function () {
                this.spTile && (this.spTile.node.color = cc.color(179, 177, 177, 255)), this.spBg && (this.spBg.node.color = cc.color(179, 177, 177, 255));
            },
            setWhite: function () {
                this.spTile && (this.spTile.node.color = cc.color(255, 255, 255, 255)), this.spBg && (this.spBg.node.color = cc.color(255, 255, 255, 255));
            },
            onSetYellow: function (e) {
                var t = !1;
                if (e && e.luckyTileValueArr && e.luckyTileValueArr.length > 0) for (var n = e.luckyTileValueArr, o = 0; o < n.length; o++) if (this._tile == n[o]) {
                    t = !0;
                    break;
                }
                e && t && e.seatIdLoc == this.seatId ? (console.log("lucky onSetYellow LieTile:", this._tile),
                    this.setLuckyLook(), this.scheduleOnce(function () {
                    var e = cc.instantiate(this.node), t = SceneHelper.getCurScene().getChildByName("cloneLayout"),
                        n = t;
                    if (this.seatId == Global.config.SEAT_DOWN) {
                        n = n.getChildByName("clone_Node_stand_down");
                        var o = Global.utils.searchNode(SceneHelper.getCurScene(), "Node_stand_down");
                        n.setPosition(o.getPosition());
                    } else if (this.seatId == Global.config.SEAT_UP) {
                        n = n.getChildByName("clone_Node_stand_up");
                        var i = Global.utils.searchNode(SceneHelper.getCurScene(), "Node_stand_up");
                        n.setPosition(i.getPosition());
                    }
                    n && n.addChild(e), e.getComponent("NodeLieTileController").setLuckyLook(), t.setSiblingIndex(t.parent.childrenCount);
                }.bind(this), 0)) : this.setGary();
            },
            setLuckyLook: function () {
                this.setWhite();
                var e = this.node.getChildByName("luckSp"), t = this.node.getChildByName("luckShadow");
                e && (e.active = !0), t && (t.active = !0);
            }
        })
    }